3.109 \(\int \frac{A+B x^2}{a+b x^2+c x^4} \, dx\)

Optimal. Leaf size=172 \[ \frac{\left (B-\frac{b B-2 A c}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} \sqrt{c} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\left (\frac{b B-2 A c}{\sqrt{b^2-4 a c}}+B\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{2} \sqrt{c} \sqrt{\sqrt{b^2-4 a c}+b}} \]

[Out]

((B - (b*B - 2*A*c)/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[
b^2 - 4*a*c]]])/(Sqrt[2]*Sqrt[c]*Sqrt[b - Sqrt[b^2 - 4*a*c]]) + ((B + (b*B - 2*A
*c)/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/
(Sqrt[2]*Sqrt[c]*Sqrt[b + Sqrt[b^2 - 4*a*c]])

_______________________________________________________________________________________

Rubi [A]  time = 0.415627, antiderivative size = 172, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091 \[ \frac{\left (B-\frac{b B-2 A c}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} \sqrt{c} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\left (\frac{b B-2 A c}{\sqrt{b^2-4 a c}}+B\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{2} \sqrt{c} \sqrt{\sqrt{b^2-4 a c}+b}} \]

Antiderivative was successfully verified.

[In]  Int[(A + B*x^2)/(a + b*x^2 + c*x^4),x]

[Out]

((B - (b*B - 2*A*c)/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[
b^2 - 4*a*c]]])/(Sqrt[2]*Sqrt[c]*Sqrt[b - Sqrt[b^2 - 4*a*c]]) + ((B + (b*B - 2*A
*c)/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/
(Sqrt[2]*Sqrt[c]*Sqrt[b + Sqrt[b^2 - 4*a*c]])

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 36.1828, size = 185, normalized size = 1.08 \[ - \frac{\sqrt{2} \left (2 A c - B b - B \sqrt{- 4 a c + b^{2}}\right ) \operatorname{atan}{\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b + \sqrt{- 4 a c + b^{2}}}} \right )}}{2 \sqrt{c} \sqrt{b + \sqrt{- 4 a c + b^{2}}} \sqrt{- 4 a c + b^{2}}} + \frac{\sqrt{2} \left (2 A c - B b + B \sqrt{- 4 a c + b^{2}}\right ) \operatorname{atan}{\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b - \sqrt{- 4 a c + b^{2}}}} \right )}}{2 \sqrt{c} \sqrt{b - \sqrt{- 4 a c + b^{2}}} \sqrt{- 4 a c + b^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x**2+A)/(c*x**4+b*x**2+a),x)

[Out]

-sqrt(2)*(2*A*c - B*b - B*sqrt(-4*a*c + b**2))*atan(sqrt(2)*sqrt(c)*x/sqrt(b + s
qrt(-4*a*c + b**2)))/(2*sqrt(c)*sqrt(b + sqrt(-4*a*c + b**2))*sqrt(-4*a*c + b**2
)) + sqrt(2)*(2*A*c - B*b + B*sqrt(-4*a*c + b**2))*atan(sqrt(2)*sqrt(c)*x/sqrt(b
 - sqrt(-4*a*c + b**2)))/(2*sqrt(c)*sqrt(b - sqrt(-4*a*c + b**2))*sqrt(-4*a*c +
b**2))

_______________________________________________________________________________________

Mathematica [A]  time = 0.168077, size = 173, normalized size = 1.01 \[ \frac{\frac{\left (B \sqrt{b^2-4 a c}+2 A c-b B\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\left (B \sqrt{b^2-4 a c}-2 A c+b B\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{\sqrt{b^2-4 a c}+b}}}{\sqrt{2} \sqrt{c} \sqrt{b^2-4 a c}} \]

Antiderivative was successfully verified.

[In]  Integrate[(A + B*x^2)/(a + b*x^2 + c*x^4),x]

[Out]

(((-(b*B) + 2*A*c + B*Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqr
t[b^2 - 4*a*c]]])/Sqrt[b - Sqrt[b^2 - 4*a*c]] + ((b*B - 2*A*c + B*Sqrt[b^2 - 4*a
*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/Sqrt[b + Sqrt[b^2
- 4*a*c]])/(Sqrt[2]*Sqrt[c]*Sqrt[b^2 - 4*a*c])

_______________________________________________________________________________________

Maple [B]  time = 0.024, size = 328, normalized size = 1.9 \[ -{c\sqrt{2}A\arctan \left ({cx\sqrt{2}{\frac{1}{\sqrt{ \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}} \right ){\frac{1}{\sqrt{-4\,ac+{b}^{2}}}}{\frac{1}{\sqrt{ \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}}+{\frac{\sqrt{2}B}{2}\arctan \left ({cx\sqrt{2}{\frac{1}{\sqrt{ \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}} \right ){\frac{1}{\sqrt{ \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}}+{\frac{b\sqrt{2}B}{2}\arctan \left ({cx\sqrt{2}{\frac{1}{\sqrt{ \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}} \right ){\frac{1}{\sqrt{-4\,ac+{b}^{2}}}}{\frac{1}{\sqrt{ \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}}-{c\sqrt{2}A{\it Artanh} \left ({cx\sqrt{2}{\frac{1}{\sqrt{ \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}} \right ){\frac{1}{\sqrt{-4\,ac+{b}^{2}}}}{\frac{1}{\sqrt{ \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}}-{\frac{\sqrt{2}B}{2}{\it Artanh} \left ({cx\sqrt{2}{\frac{1}{\sqrt{ \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}} \right ){\frac{1}{\sqrt{ \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}}+{\frac{b\sqrt{2}B}{2}{\it Artanh} \left ({cx\sqrt{2}{\frac{1}{\sqrt{ \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}} \right ){\frac{1}{\sqrt{-4\,ac+{b}^{2}}}}{\frac{1}{\sqrt{ \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) c}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x^2+A)/(c*x^4+b*x^2+a),x)

[Out]

-c/(-4*a*c+b^2)^(1/2)*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctan(c*x*2^(1/2
)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*A+1/2*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/
2)*arctan(c*x*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*B+1/2/(-4*a*c+b^2)^(1/2)
*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctan(c*x*2^(1/2)/((b+(-4*a*c+b^2)^(1
/2))*c)^(1/2))*b*B-c/(-4*a*c+b^2)^(1/2)*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2
)*arctanh(c*x*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*A-1/2*2^(1/2)/((-b+(-4*
a*c+b^2)^(1/2))*c)^(1/2)*arctanh(c*x*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*
B+1/2/(-4*a*c+b^2)^(1/2)*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctanh(c*x*2
^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*b*B

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{B x^{2} + A}{c x^{4} + b x^{2} + a}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x^2 + A)/(c*x^4 + b*x^2 + a),x, algorithm="maxima")

[Out]

integrate((B*x^2 + A)/(c*x^4 + b*x^2 + a), x)

_______________________________________________________________________________________

Fricas [A]  time = 0.373776, size = 2118, normalized size = 12.31 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x^2 + A)/(c*x^4 + b*x^2 + a),x, algorithm="fricas")

[Out]

1/2*sqrt(1/2)*sqrt(-(B^2*a*b - (4*A*B*a - A^2*b)*c + (a*b^2*c - 4*a^2*c^2)*sqrt(
(B^4*a^2 - 2*A^2*B^2*a*c + A^4*c^2)/(a^2*b^2*c^2 - 4*a^3*c^3)))/(a*b^2*c - 4*a^2
*c^2))*log(-2*(B^4*a^2 - A*B^3*a*b + A^3*B*b*c - A^4*c^2)*x + sqrt(1/2)*(A*B^2*a
*b^2 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c - A^4*c^2)*x
+ sqrt(1/2)*(A*B^2*a*b^2 + 4*A^3*a*c^2 - (4*A*B^2*a^2 + A^3*b^2)*c - (4*(2*B*a^3
 - A*a^2*b)*c^2 - (2*B*a^2*b^2 - A*a*b^3)*c)*sqrt((B^4*a^2 - 2*A^2*B^2*a*c + A^4
*c^2)/(a^2*b^2*c^2 - 4*a^3*c^3)))*sqrt(-(B^2*a*b - (4*A*B*a - A^2*b)*c - (a*b^2*
c - 4*a^2*c^2)*sqrt((B^4*a^2 - 2*A^2*B^2*a*c + A^4*c^2)/(a^2*b^2*c^2 - 4*a^3*c^3
)))/(a*b^2*c - 4*a^2*c^2))) - 1/2*sqrt(1/2)*sqrt(-(B^2*a*b - (4*A*B*a - A^2*b)*c
 - (a*b^2*c - 4*a^2*c^2)*sqrt((B^4*a^2 - 2*A^2*B^2*a*c + A^4*c^2)/(a^2*b^2*c^2 -
 4*a^3*c^3)))/(a*b^2*c - 4*a^2*c^2))*log(-2*(B^4*a^2 - A*B^3*a*b + A^3*B*b*c - A
^4*c^2)*x - sqrt(1/2)*(A*B^2*a*b^2 + 4*A^3*a*c^2 - (4*A*B^2*a^2 + A^3*b^2)*c - (
4*(2*B*a^3 - A*a^2*b)*c^2 - (2*B*a^2*b^2 - A*a*b^3)*c)*sqrt((B^4*a^2 - 2*A^2*B^2
*a*c + A^4*c^2)/(a^2*b^2*c^2 - 4*a^3*c^3)))*sqrt(-(B^2*a*b - (4*A*B*a - A^2*b)*c
 - (a*b^2*c - 4*a^2*c^2)*sqrt((B^4*a^2 - 2*A^2*B^2*a*c + A^4*c^2)/(a^2*b^2*c^2 -
 4*a^3*c^3)))/(a*b^2*c - 4*a^2*c^2)))

_______________________________________________________________________________________

Sympy [A]  time = 15.3781, size = 314, normalized size = 1.83 \[ \operatorname{RootSum}{\left (t^{4} \left (256 a^{3} c^{3} - 128 a^{2} b^{2} c^{2} + 16 a b^{4} c\right ) + t^{2} \left (- 16 A^{2} a b c^{2} + 4 A^{2} b^{3} c + 64 A B a^{2} c^{2} - 16 A B a b^{2} c - 16 B^{2} a^{2} b c + 4 B^{2} a b^{3}\right ) + A^{4} c^{2} - 2 A^{3} B b c + 2 A^{2} B^{2} a c + A^{2} B^{2} b^{2} - 2 A B^{3} a b + B^{4} a^{2}, \left ( t \mapsto t \log{\left (x + \frac{- 32 t^{3} A a^{2} b c^{2} + 8 t^{3} A a b^{3} c + 64 t^{3} B a^{3} c^{2} - 16 t^{3} B a^{2} b^{2} c - 4 t A^{3} a c^{2} + 2 t A^{3} b^{2} c - 6 t A^{2} B a b c + 12 t A B^{2} a^{2} c - 2 t B^{3} a^{2} b}{- A^{4} c^{2} + A^{3} B b c - A B^{3} a b + B^{4} a^{2}} \right )} \right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x**2+A)/(c*x**4+b*x**2+a),x)

[Out]

RootSum(_t**4*(256*a**3*c**3 - 128*a**2*b**2*c**2 + 16*a*b**4*c) + _t**2*(-16*A*
*2*a*b*c**2 + 4*A**2*b**3*c + 64*A*B*a**2*c**2 - 16*A*B*a*b**2*c - 16*B**2*a**2*
b*c + 4*B**2*a*b**3) + A**4*c**2 - 2*A**3*B*b*c + 2*A**2*B**2*a*c + A**2*B**2*b*
*2 - 2*A*B**3*a*b + B**4*a**2, Lambda(_t, _t*log(x + (-32*_t**3*A*a**2*b*c**2 +
8*_t**3*A*a*b**3*c + 64*_t**3*B*a**3*c**2 - 16*_t**3*B*a**2*b**2*c - 4*_t*A**3*a
*c**2 + 2*_t*A**3*b**2*c - 6*_t*A**2*B*a*b*c + 12*_t*A*B**2*a**2*c - 2*_t*B**3*a
**2*b)/(-A**4*c**2 + A**3*B*b*c - A*B**3*a*b + B**4*a**2))))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.814709, size = 1, normalized size = 0.01 \[ \mathit{Done} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x^2 + A)/(c*x^4 + b*x^2 + a),x, algorithm="giac")

[Out]

Done